package com.lqh.studyproject.spring;

import org.junit.Test;

/**
 * @ClassName SimpleIOCTest
 * @Description studyproject
 * @Author bgy-lqh
 * @Date 2020/5/15 17:55
 * @Version ioc测试类
 **/
public class SimpleIOCTest {
    @Test
    public void getBean() throws Exception {
        String location = SimpleIOC.class.getClassLoader().getResource("spring-test.xml").getFile();
        SimpleIOC bf = new SimpleIOC(location);
        Wheel wheel = (Wheel) bf.getBean("wheel");
        System.out.println(wheel);
        Car car = (Car) bf.getBean("car");
        System.out.println(car);
    }
}